import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale-provider/zh_CN';
import Manage from "./lib/manage";
import App from "./App";
import "./index.css";

export default class Index extends React.Component {
  render() {
    return (
      <ConfigProvider locale={zhCN}>
        <Router>
          <Switch>
            <Route
              exact
              path="/design/:id"
              component={App}
            />
            <Route 
              exact path="" 
              component={Manage} 
            />
          </Switch>
        </Router>
      
      </ConfigProvider>
    );
  }
}
ReactDOM.render(<Index />, document.getElementById("root"));
